// 类与接口  
export {} // 确保跟其他示例没有成员冲突  

// 定义接口
interface EatAndRun {
    eat(foo: string):void
    run(distence:number): void
}

// 一个接口只去约束一个能力
// 让一个类型同时去实现多个接口
interface Eat {
    eat(foo: string):void
}
interface Run {
    run(distence:number): void
}

class Person implements EatAndRun {
    eat(foo:string): void {
        console.log(`优雅的进餐：${foo}`)
    }
    run (distance: number): void{
        console.log(`直立行走：${distance}`)
    }
}

class Animal implements Eat,Run {
    eat(foo:string): void {
        console.log(`呼噜呼噜的吃：${foo}`)
    }
    run (distance: number): void{
        console.log(`爬行：${distance}`)
    }
}